<%@page import="java.util.ArrayList"%>
<%@page import="transfer.User"%>
<%@page import="content.UserContent"%>
<%@page import="content.OrderContent"%>
<%@page import="transfer.Order"%>
<%
    String role = "courier";
    String link = "";
    String view = request.getParameter("view");
    if (view == null) {
        if (role.equals("customer")) {
            link = "../dashboard.jsp";
        } else if (role.equals("courier")) {
            link = "../courier/courier.jsp";
        } else if (role.equals("warehouse")) {
            link = "../warehouse/warehouse.jsp";
        }
    } else {
        link = "../" + role + "/" + view + ".jsp";
    }
%>

<div id="content">
    <%
        User user = UserContent.getUser(new Integer(request.getParameter("id")));
    %>
    <h3><%=user.getFirstName()+" "+user.getLastName()%> dashboard</h3>
    
    <div class="adminmenu" style="border-bottom: 3px solid #63c2ec; padding-bottom: 7px;">
        <% if (role.equals("warehouse")) {%>
        <a href="admin.jsp?content=dashboard&view=order">Order list</a>
        <a href="admin.jsp?content=dashboard&view=product">Catalog</a>
        <a href="admin.jsp?content=dashboard&view=warehouse">Warehouses</a>
        <a href="admin.jsp?content=dashboard&view=report">Reports</a>
        <% }%>
    </div>
    <jsp:include page="<%= link%>" flush="true"/>
</div>
